package com.baizhi.app;


import com.baizhi.common.R;
import com.baizhi.entity.CmfzAlbum;
import com.baizhi.service.CmfzAlbumService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/album")
public class AppAlbumController {

    @Autowired
    private CmfzAlbumService cmfzAlbumService;

    @GetMapping("/selectAlbum")
    public R selectAlbum(){
        HashMap<Object, Object> map = new HashMap<>();

        QueryWrapper<CmfzAlbum> queryWrapper = new QueryWrapper<>();

        return R.ok();
    }

    /**
     * 查询所有相册
     * @return
     */
    @GetMapping("/selectAllAlbum")
    public R selectAllAlbum(){
        HashMap<Object, Object> map = new HashMap<>();
        QueryWrapper<CmfzAlbum> queryWrapper = new QueryWrapper<>();
        List<CmfzAlbum> cmfzAlbums= cmfzAlbumService.selectAllAlbum();
        return R.ok().put("data",cmfzAlbums);
    }
}
